home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1998 January / PC Answers Issue 49 Cover CD January 1998.iso / Apps / Director / DATA.Z / Behavior Library.cst / 00041_Video Control.ls < prev    next >
Encoding:
Text File  |  1997-05-09  |  1.4 KB  |  50 lines

  1. -- Video   Controller   Commands
  2.  
  3. -- a control
  4.  
  5. property videoSprite    -- the sprite number that is getting controlled
  6. property videoCommand   -- the command to be issued
  7.  
  8. on InitVidControl me
  9.   case ( the VideoCommand of me ) of:
  10.     #Play:
  11.       set the movieRate of sprite the VideoSprite of me = 1
  12.     #Pause:
  13.       set the movieRate of sprite the VideoSprite of me = 0
  14.     #Stop:
  15.       set the movieRate of sprite the VideoSprite of me = 0
  16.       set the movietime of sprite the VideoSprite of me = 0
  17.     #Rewind:
  18.       set the movietime of sprite the VideoSprite of me = 0
  19.   end case
  20. end
  21.  
  22.  
  23. on mouseUp me
  24.   initVidControl me
  25. end
  26.  
  27. ---
  28.  
  29. on getPropertyDescriptionList
  30.   set p_list = [ ┬¼
  31.   #videoCommand: [ #comment:   "Command:", ┬¼
  32.                     #format:   #symbol, ┬¼
  33.                      #range: [ #Play, #Pause, #Stop, #Rewind ], ┬¼
  34.                    #default:   #Play ], ┬¼
  35.    #videoSprite: [ #comment:   "Video Sprite Channel:", ┬¼
  36.                     #format:   #integer, ┬¼
  37.                    #default:    1 ] ┬¼
  38.                  ]
  39.   return p_list
  40. end
  41.  
  42. on getBehaviorDescription
  43.   return ┬¼
  44. "Provides Play, Pause, Stop, or Rewind controls for a digital video sprite." & RETURN & ┬¼
  45. "PARAMETERS:" & RETURN & ┬¼
  46. "ΓÇó Command - Choose the video playback command to invoke ( Play, Pause, Stop, Rewind )." & RETURN & ┬¼
  47. "ΓÇó Sprite - Enter the number of sprite channel in which video is displayed." 
  48. end
  49.  
  50.